package com.example.studyroom.service;

import com.example.studyroom.Entity.StudyRoom;
import com.example.studyroom.dto.StudyRoomAdmin.RoomAdminDTO;


import java.util.List;

public interface StudyRoomService {

    //获取所有自习室
    List<StudyRoom> getAllStudyRooms();

    //添加自习室
    void addStudyRoom(StudyRoom studyRoom);

    //删除自习室
    void deleteStudyRoom(Integer id);

    //修改自习室信息
    void modifyStudyRoom(StudyRoom studyRoom);

    //查看自习室负责的管理员
    List<RoomAdminDTO> getStudyRoomsByAdmin(String adminName);

    //更新剩余座位：先根据自习室名称查找自习室，然后再将剩余座位-1
    //根据自习室名称查找自习室
    StudyRoom findByRoomName(String roomName);

    //更新剩余座位
    void updateCapacity(StudyRoom studyRoom);

    //更新自习室负责的管理员
    void updateRoomAdmin(StudyRoom studyRoom);

}
